package rs.mbs2.epics.server.servlet.util;

import rs.mbs2.epics.server.entity.User;
import rs.mbs2.epics.server.session.dao.localinterface.UserDaoLocal;


public class Validation {

	public static boolean validateString(String parameter) {
		if(parameter == null || parameter.equals("")) {
			return false;
		}
		
		return true;
	}
	
	public static boolean validateEmailAddress(String emailAddress, UserDaoLocal userDao) {
		User user = userDao.findUserByEmail(emailAddress);
		if(user != null)
			return false;
		
		return true;
	}
	
}
